import request from "@/utils/request";

export function getPrintTemplates(paramters) {
  return request({
    url: "api/v1/printtemplates",
    method: "get",
    params: paramters,
    authServer: false,
  });
}

export function getPrintTemplate(id) {
  return request({
    url: "api/v1/printtemplates/" + id,
    method: "get",
    authServer: false,
  });
}

export function addPrintTemplate(data) {
  return request({
    url: "api/v1/printtemplates",
    method: "post",
    data: data,
    authServer: false,
  });
}

export function updatePrintTemplate(data) {
  return request({
    url: "api/v1/printtemplates",
    method: "put",
    data: data,
    authServer: false,
  });
}

export function deletePrintTemplate(id) {
  return request({
    url: "api/v1/printtemplates/" + id,
    method: "delete",
    authServer: false,
  });
}

export function printData(data) {
  return request({
    url: "api/v1/leps/print",
    method: "post",
    data: data,
    authServer: false,
  });
}
